package com.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.entity.Message;
import com.example.entity.MessageVO;
import com.example.mapper.MessageMapper;
import com.example.service.MessageService;

@Service
public class MessageSeviceImpl implements MessageService {
	
	@Autowired
	private MessageMapper messageMapper;
	
	/**
	 * 多条件查询消息
	 */
	@Override
	public List<Message> findMessage(MessageVO messageVO) {
		return messageMapper.findMessage(messageVO);
	}


	@Override
	public int getCount(MessageVO messageVO) {
		return messageMapper.getCount(messageVO);
	}

	/**
	 * 发消息
	 */
	@Override
	public int sendNews(Message message) {
		return messageMapper.sendNews(message);
	}


	/**
	 * 查看此消息是否已读
	 */
	@Override
	public List<Message> selectMyMessageIsLook(Message message) {
		return messageMapper.selectMyMessageIsLook(message);
	}


	/**
	 * 全部标为已读
	 */
	@Override
	public int updateMessageIsLook(Message message) {
		return messageMapper.updateMessageIsLook(message);
	}

	
	
	
	

}
